{extend name='extra@admin/content'}
{block name="button"}
{/block}
{block name="content"}
<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <!-- <div class="layui-form-item layui-inline">
        <label class="layui-form-label">评论列表</label>
        <div class="layui-input-inline">
            <input name="name" value="{$Think.get.name|default=''}" placeholder="请输入关键词" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div> -->
</form>
<!-- 表单搜索 结束 -->
<form onsubmit="return false;" data-auto="true" method="post">
    {if empty($list)}
    <p class="help-block text-center well">没 有 评 论 ！</p>
    {else}
     <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <tr>
                <th class='list-table-check-td'>
                    <input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
                </th>
                <th class='text-left nowrap'>昵称</th>
                <th class='text-left nowrap'>商品名称</th>
                <th class='text-left nowrap'>内容</th> 
                <th class='text-left nowrap'>评论时间</th>
                <th class='text-left nowrap'>操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td'>
                    <input class="list-check-box" value='{$vo.uid}' type='checkbox'/>
                </td>
                 <td class='text-left nowrap'>
                    {$vo.nickname}
                </td>
                 <td class='text-left nowrap'>
                    {$vo.name} -- {$vo.spec_title}
                </td>
                 <td class='text-left nowrap'>
                    {$vo.content}
                </td>
                <td class='text-left nowrap'>
                    {$vo.addtime|date="Y-m-d",###}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$vo.is_show eq 1"}
                        {if auth("$classuri/comment_shows")}
                            <a data-update="{$vo.id}" data-field='is_show' data-value='1' data-action='{:url("$classuri/comment_shows")}'
                       href="javascript:void(0)">显示</a>
                        {else /}
                            无权限
                        {/if}
                    {else /}
                        {if ($vo.is_show eq 0) AND auth('$classuri/comment_shows')}
                            <a data-update="{$vo.id}" data-field='is_show' data-value='0' data-action='{:url("$classuri/comment_shows")}'
                       href="javascript:void(0)">关闭</a>
                        {else /}
                            无权限
                        {/if}
                    {/if}
                    {if auth("$classuri/comment_detail")}
                    <span class="text-explode">|</span>
                    <a data-modal='{:url("$classuri/comment_detail")}?id={$vo.id}' href="javascript:void(0)">详情</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>
    {if isset($page)}<p>{$page}</p>{/if}
    {/if}
    <script>
    </script>
</form>
{/block}